<%@ page import="com.liuya.common.I18N" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>

<%
    I18N i18n = I18N.getWebInstance(request);
    String parentId = request.getParameter("parentId");
%>

<form id="createForm" action="add.do?oper=add" method="post">
    <input type="hidden" name="parentId" value="<%=parentId%>"/>
    <label><%=i18n.say("Group") %>
    </label>
    <input name="isLeaf" type="radio" value="false"/> Yes
    <input name="isLeaf" type="radio" value="true" checked="checked"/>No <br/>
    <label><%=i18n.say("Name") %>
    </label>
    <input name="name" type="text" size="50"/><br/>
    <label><%=i18n.say("Description") %>
    </label>
    <input name="description" type="text" size="50"/><br/>
    <input type="submit" value="OK"/>
</form>
<script language="javascript">
    var createOptions = {
        beforeSubmit: beforeCreate,
        success: afterCreate,
        resetForm: true
    };

    // bind form using 'ajaxForm'
    jQuery('#createForm').ajaxForm(createOptions);
</script>